/*
* Copyright (c)  2017, ueboot.com
* All rights reserved.
* 2017-10-24 15:19:32
*/
package com.ueboot.weishop.service.goods.impl;

import com.ueboot.weishop.entity.goods.GoodsSpecValueEntity;
import com.ueboot.core.repository.BaseRepository;
import com.ueboot.weishop.repository.goods.GoodsSpecValueRepository;
import com.ueboot.core.service.impl.BaseServiceImpl;
import com.ueboot.weishop.service.goods.GoodsSpecValueService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by yangkui  on 2017-10-24 15:19:32.
 * @author yangkui
 * @since 2.0 by autocode
 */
@Slf4j
@Service
public class GoodsSpecValueServiceImpl extends BaseServiceImpl<GoodsSpecValueEntity> implements GoodsSpecValueService{
    @Autowired
    private GoodsSpecValueRepository goodsSpecValueRepository;

    @Override
    protected BaseRepository getBaseRepository() {
         return goodsSpecValueRepository;
    }

    /**
     * 删除
     *
     * @param goodsInfoId
     */
    @Override
    @Transactional(rollbackFor = Exception.class, timeout = 120, propagation = Propagation.REQUIRED)
    public void deleteGoodsSpecValueEntitiesByGoodsInfoId(Long goodsInfoId) {
        goodsSpecValueRepository.deleteGoodsSpecValueEntitiesByGoodsInfoId(goodsInfoId);
    }
}
